Comparing Arrays using LINQ in C#

73

Comparing Arrays using LINQ in C# -

string[] a = { "a", "b" };
string[] b = { "a", "b" };

return (a.Length == b.Length && a.Intersect(b).Count() == a.Length);

Comments

Submit
0 Comments